import request from '@/utils/request.js'

export function getComments (params) {
  return request({
    url: '/v1_0/comments',
    method: 'get',
    params
  })
}

export function addLikeComment (target) {
  return request({
    url: '/v1_0/comment/likings',
    method: 'POST',
    data: {
      target
    }
  })
}

export function deleteLikeComment (target) {
  return request({
    url: '/v1_0/comment/likings/' + target,
    method: 'DELETE'
  })
}

export function addComment (data) {
  return request({
    url: '/v1_0/comments',
    method: 'POST',
    data
  })
}
